#include "double_linked_list.h"

void test_one()
{
	list_node* plist = list_init();
	list_push_back(plist, 1);
	list_push_back(plist, 2);
	list_push_back(plist, 3);
	list_push_back(plist, 4);
	list_print(plist);

	list_push_front(plist, 1);
	list_push_front(plist, 2);
	list_push_front(plist, 3);
	list_push_front(plist, 4);
	list_print(plist);

	list_pop_back(plist);
	list_pop_back(plist);
	list_print(plist);

	list_pop_front(plist);
	list_pop_front(plist);
	list_pop_front(plist);
	list_print(plist);

	list_node* pos = list_find(plist, 2);
	list_insert(pos, 4);
	list_print(plist);

	pos = list_find(plist, 1);
	list_erase(pos);
	list_print(plist);

}

int main()
{
	test_one();
	return 0;
}